/*
package org.itboys.core.controller.web;

import org.itboys.commons.CommonConstants;
import org.itboys.commons.dto.ResultPageDOHelper;
import org.itboys.commons.utils.ajax.AjaxUtils;
import org.itboys.core.entity.mongo.SundayFeedback;
import org.itboys.core.entity.mongo.SundayFeedbackAns;
import org.itboys.core.service.mongo.web.SundayFeedbackAnsService;
import org.itboys.core.service.mongo.web.SundayFeedbackService;
import org.itboys.core.util.ResponseMessage;
import org.itboys.framework.query.JsonPageUtils;
import org.itboys.framework.spring.controller.BaseController;
import org.itboys.param.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

*/
/**
 * Auther: 罗尧坤
 * Date: 2018/8/1
 * Description: 用户反馈信息
 *//*

@Controller
@RequestMapping("/sunday/web/feedback")
public class SundayFeedbackController extends BaseController {
    @Autowired
    private SundayFeedbackService feedbackService;

    @Autowired
    private SundayFeedbackAnsService feedbackAnsService;


//=========================================查询用户反馈部分==================================================//
    */
/**
     * 用户反馈列表记录
     * @param request
     * @return
     *//*

    @RequestMapping("/index" )
    public  String index(HttpServletRequest request){
        return "/sunday/feedback/index";
    }

    */
/**
     * 查询用户反馈记录
     * @param request
     * @param response
     *//*

    @RequestMapping("/select")
    public void select(HttpServletRequest request,
                       HttpServletResponse response
    ){
        try {
            PageResult<SundayFeedback> result = feedbackService.select(request);
            JsonPageUtils.renderJsonPage(result.getTotal(),result.getData(),response);

        } catch (Exception e) {
            String msg ="";
            if(e.getClass().getSimpleName().equalsIgnoreCase("ErrorException")){
                msg=e.getMessage();
            }else{
                msg= CommonConstants.ERROMSG;
                logger.error("/sunday/web/feedback/select------"+e.getMessage());
            }
            e.printStackTrace();
            ResponseMessage.error(CommonConstants.FAIL_CODE, msg);
        }
    }

    */
/**
     * 设置是否已阅
     * @param request
     * @param response
     * @param id
     * @param status
     *//*

    @RequestMapping("/setStatus")
    public void setStatus(HttpServletRequest request,
                          HttpServletResponse response,
                          @RequestParam(value="id",required=true) Long id
            ,@RequestParam(value="status",required=true) Integer status
    ) {
        try {
            feedbackService.setStatus(id,status);
            AjaxUtils.renderJsonporJson(response, null,
                    ResultPageDOHelper.getMsgCodeResultDO(CommonConstants.SUCCESS_CODE, CommonConstants.SUCCESS));
        } catch (Exception e) {
            String msg = "";
            if (e.getClass().getSimpleName().equalsIgnoreCase("ErroException")) {
                msg = e.getMessage();
            } else {
                msg = CommonConstants.ERROMSG;
                logger.error("/sunday/web/feedback/setStatus------" + e.getMessage());
            }
            e.printStackTrace();

            AjaxUtils.renderJsonporJson(response, null,
                    ResultPageDOHelper.getMsgCodeResultDO(CommonConstants.FAIL_CODE, CommonConstants.FAIL));
        }
    }

    */
/**
     * 设置是否已阅
     * @param request
     * @param response
     * @param id
     * @param isAnswerd
     *//*

    @RequestMapping("/setIsAnswerd")
    public void setIsAnswerd(HttpServletRequest request,
                          HttpServletResponse response,
                          @RequestParam(value="id",required=true) Long id
            ,@RequestParam(value="isAnswerd",required=true) Integer isAnswerd
    ) {
        try {
            feedbackService.setIsAnswerd(id,isAnswerd);
            AjaxUtils.renderJsonporJson(response, null,
                    ResultPageDOHelper.getMsgCodeResultDO(CommonConstants.SUCCESS_CODE, CommonConstants.SUCCESS));
        } catch (Exception e) {
            String msg = "";
            if (e.getClass().getSimpleName().equalsIgnoreCase("ErroException")) {
                msg = e.getMessage();
            } else {
                msg = CommonConstants.ERROMSG;
                logger.error("/sunday/web/feedback/isAnswerd------" + e.getMessage());
            }
            e.printStackTrace();

            AjaxUtils.renderJsonporJson(response, null,
                    ResultPageDOHelper.getMsgCodeResultDO(CommonConstants.FAIL_CODE, CommonConstants.FAIL));
        }
    }
//=========================================回答用户反馈部分==================================================//

    */
/**
     * 单个查询
     * @param request
     * @param response
     *//*

    @RequestMapping("/findOne")
    public void findOne(HttpServletRequest request,
                        HttpServletResponse response,
                        @RequestParam(value="id",required=true) Long id
    ) {
        try {

            SundayFeedbackAns feedbackAns = feedbackAnsService.findOne(request, id);
            AjaxUtils.renderJson(response, feedbackAns);
        } catch (Exception e) {
            e.printStackTrace();

            String msg ="";
            if(e.getClass().getSimpleName().equalsIgnoreCase("ErroException")){
                msg=e.getMessage();
            }else{
                msg= CommonConstants.ERROMSG;
                logger.error("/sunday/web/feedback/findOne------"+e.getMessage());
            }
            e.printStackTrace();
            AjaxUtils.renderJsonporJson(response, null,
                    ResultPageDOHelper.getMsgCodeResultDO(CommonConstants.FAIL_CODE, CommonConstants.FAIL));
        }

    }
    */
/**
     * 新增或修改产品分类
     * @param request
     * @param response
     *//*

    @RequestMapping("/save")
    public void save(HttpServletRequest request,
                     HttpServletResponse response,
                     @ModelAttribute SundayFeedbackAns feedbackAns
    ) {
        try {
            feedbackAnsService.save(feedbackAns);
            AjaxUtils.renderJsonporJson(response, null,
                    ResultPageDOHelper.getMsgCodeResultDO(CommonConstants.SUCCESS_CODE, CommonConstants.SUCCESS));
        } catch (Exception e) {

            e.printStackTrace();
            String msg = "";
            if (e.getClass().getSimpleName().equalsIgnoreCase("ErroException")) {
                msg = e.getMessage();
            } else {
                msg = CommonConstants.ERROMSG;
                logger.error("/sunday/web/feedback/save------" + e.getMessage());
            }
            e.printStackTrace();
            AjaxUtils.renderJsonporJson(response, null,
                    ResultPageDOHelper.getMsgCodeResultDO(CommonConstants.FAIL_CODE, CommonConstants.FAIL));
        }
    }
}
*/
